package com.company;

import java.util.Scanner;

public class demo33 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个整数：");
        int n = sc.nextInt();
        int sum=0;
        int count=0;
        for (int i =1;i<=n;i++){
            if (i%7==0){
                sum++;
                count+=i;
            }
        }
        System.out.println("1到"+n+"之间能被 7 整除的整数的个数有”"+sum+"“个,这些能被 7 整除的数的和为”"+count+"”");
    }
}
